#ifndef SCRIPTABLELUA_H
#define SCRIPTABLELUA_H


extern "C" {
#include "../lib/lua/lua.h"
#include "../lib/lua/lualib.h"
#include "../lib/lua/lauxlib.h"
}

#include <string>

class ScriptableLua
{
    public:
        ScriptableLua();
        virtual ~ScriptableLua();

        void runInitInScript();//called when the game starts
        virtual void runUpdateInScript(double timeSinceLastFrame);//run "step" lua function
        void runClearInScript();//delete lua_State

        void loadScript(std::string _script);

        bool isScriptInitialized();
        bool isScriptDefined();


    protected:

        std::string m_textScript;
        lua_State * L;

        bool m_isScriptInitialized;
        bool m_isScriptDefined;

    private:




};

#endif // SCRIPTABLELUA_H
